package com.ruoyi.huoyun.message.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.huoyun.message.mapper.LeaveMessageMapper;
import com.ruoyi.huoyun.message.domain.LeaveMessage;
import com.ruoyi.huoyun.message.service.ILeaveMessageService;

/**
 * 留言Service业务层处理
 *
 * @author mj
 * @date 2021-11-29
 */
@Service
public class LeaveMessageServiceImpl implements ILeaveMessageService
{
    @Autowired
    private LeaveMessageMapper leaveMessageMapper;

    /**
     * 查询留言
     *
     * @param leaveMessageId 留言主键
     * @return 留言
     */
    @Override
    public LeaveMessage selectLeaveMessageByLeaveMessageId(String leaveMessageId)
    {
        return leaveMessageMapper.selectLeaveMessageByLeaveMessageId(leaveMessageId);
    }

    /**
     * 查询留言列表
     *
     * @param leaveMessage 留言
     * @return 留言
     */
    @Override
    public List<LeaveMessage> selectLeaveMessageList(LeaveMessage leaveMessage)
    {
        return leaveMessageMapper.selectLeaveMessageList(leaveMessage);
    }

    /**
     * 新增留言
     *
     * @param leaveMessage 留言
     * @return 结果
     */
    @Override
    public int insertLeaveMessage(LeaveMessage leaveMessage)
    {
        return leaveMessageMapper.insertLeaveMessage(leaveMessage);
    }

    /**
     * 修改留言
     *
     * @param leaveMessage 留言
     * @return 结果
     */
    @Override
    public int updateLeaveMessage(LeaveMessage leaveMessage)
    {
        return leaveMessageMapper.updateLeaveMessage(leaveMessage);
    }

    /**
     * 批量删除留言
     *
     * @param leaveMessageIds 需要删除的留言主键
     * @return 结果
     */
    @Override
    public int deleteLeaveMessageByLeaveMessageIds(String[] leaveMessageIds)
    {
        return leaveMessageMapper.deleteLeaveMessageByLeaveMessageIds(leaveMessageIds);
    }

    /**
     * 删除留言信息
     *
     * @param leaveMessageId 留言主键
     * @return 结果
     */
    @Override
    public int deleteLeaveMessageByLeaveMessageId(String leaveMessageId)
    {
        return leaveMessageMapper.deleteLeaveMessageByLeaveMessageId(leaveMessageId);
    }
}
